# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1EnvironmentConfig do
  @moduledoc """


  ## Attributes

  *   `addonsConfig` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1RuntimeAddonsConfig.t`, *default:* `nil`) - The latest runtime configurations for add-ons.
  *   `arcConfigLocation` (*type:* `String.t`, *default:* `nil`) - The location for the config blob of API Runtime Control, aka Envoy Adapter, for op-based authentication as a URI, e.g. a Cloud Storage URI. This is only used by Envoy-based gateways.
  *   `clientIpResolutionConfig` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1EnvironmentConfigClientIPResolutionConfig.t`, *default:* `nil`) - The algorithm to resolve IP.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Time that the environment configuration was created.
  *   `dataCollectors` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DataCollectorConfig.t)`, *default:* `nil`) - List of data collectors used by the deployments in the environment.
  *   `debugMask` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DebugMask.t`, *default:* `nil`) - Debug mask that applies to all deployments in the environment.
  *   `deploymentGroups` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DeploymentGroupConfig.t)`, *default:* `nil`) - List of deployment groups in the environment.
  *   `deployments` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DeploymentConfig.t)`, *default:* `nil`) - List of deployments in the environment.
  *   `envScopedRevisionId` (*type:* `String.t`, *default:* `nil`) - Revision ID for environment-scoped resources (e.g. target servers, keystores) in this config. This ID will increment any time a resource not scoped to a deployment group changes.
  *   `featureFlags` (*type:* `map()`, *default:* `nil`) - Feature flags inherited from the organization and environment.
  *   `flowhooks` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1FlowHookConfig.t)`, *default:* `nil`) - List of flow hooks in the environment.
  *   `forwardProxyUri` (*type:* `String.t`, *default:* `nil`) - The forward proxy's url to be used by the runtime. When set, runtime will send requests to the target via the given forward proxy. This is only used by programmable gateways.
  *   `gatewayConfigLocation` (*type:* `String.t`, *default:* `nil`) - The location for the gateway config blob as a URI, e.g. a Cloud Storage URI. This is only used by Envoy-based gateways.
  *   `keystores` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1KeystoreConfig.t)`, *default:* `nil`) - List of keystores in the environment.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Name of the environment configuration in the following format: `organizations/{org}/environments/{env}/configs/{config}`
  *   `provider` (*type:* `String.t`, *default:* `nil`) - Used by the Control plane to add context information to help detect the source of the document during diagnostics and debugging.
  *   `pubsubTopic` (*type:* `String.t`, *default:* `nil`) - Name of the PubSub topic for the environment.
  *   `resourceReferences` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ReferenceConfig.t)`, *default:* `nil`) - List of resource references in the environment.
  *   `resources` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ResourceConfig.t)`, *default:* `nil`) - List of resource versions in the environment.
  *   `revisionId` (*type:* `String.t`, *default:* `nil`) - Revision ID of the environment configuration. The higher the value, the more recently the configuration was deployed.
  *   `sequenceNumber` (*type:* `String.t`, *default:* `nil`) - DEPRECATED: Use revision_id.
  *   `targets` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1TargetServerConfig.t)`, *default:* `nil`) - List of target servers in the environment. Disabled target servers are not displayed.
  *   `traceConfig` (*type:* `GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1RuntimeTraceConfig.t`, *default:* `nil`) - Trace configurations. Contains config for the environment and config overrides for specific API proxies.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Unique ID for the environment configuration. The ID will only change if the environment is deleted and recreated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :addonsConfig =>
            GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1RuntimeAddonsConfig.t() | nil,
          :arcConfigLocation => String.t() | nil,
          :clientIpResolutionConfig =>
            GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1EnvironmentConfigClientIPResolutionConfig.t()
            | nil,
          :createTime => DateTime.t() | nil,
          :dataCollectors =>
            list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DataCollectorConfig.t()) | nil,
          :debugMask => GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DebugMask.t() | nil,
          :deploymentGroups =>
            list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DeploymentGroupConfig.t()) | nil,
          :deployments =>
            list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DeploymentConfig.t()) | nil,
          :envScopedRevisionId => String.t() | nil,
          :featureFlags => map() | nil,
          :flowhooks =>
            list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1FlowHookConfig.t()) | nil,
          :forwardProxyUri => String.t() | nil,
          :gatewayConfigLocation => String.t() | nil,
          :keystores =>
            list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1KeystoreConfig.t()) | nil,
          :name => String.t() | nil,
          :provider => String.t() | nil,
          :pubsubTopic => String.t() | nil,
          :resourceReferences =>
            list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ReferenceConfig.t()) | nil,
          :resources =>
            list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ResourceConfig.t()) | nil,
          :revisionId => String.t() | nil,
          :sequenceNumber => String.t() | nil,
          :targets =>
            list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1TargetServerConfig.t()) | nil,
          :traceConfig =>
            GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1RuntimeTraceConfig.t() | nil,
          :uid => String.t() | nil
        }

  field(:addonsConfig, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1RuntimeAddonsConfig)
  field(:arcConfigLocation)

  field(:clientIpResolutionConfig,
    as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1EnvironmentConfigClientIPResolutionConfig
  )

  field(:createTime, as: DateTime)

  field(:dataCollectors,
    as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DataCollectorConfig,
    type: :list
  )

  field(:debugMask, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DebugMask)

  field(:deploymentGroups,
    as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DeploymentGroupConfig,
    type: :list
  )

  field(:deployments,
    as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1DeploymentConfig,
    type: :list
  )

  field(:envScopedRevisionId)
  field(:featureFlags, type: :map)
  field(:flowhooks, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1FlowHookConfig, type: :list)
  field(:forwardProxyUri)
  field(:gatewayConfigLocation)
  field(:keystores, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1KeystoreConfig, type: :list)
  field(:name)
  field(:provider)
  field(:pubsubTopic)

  field(:resourceReferences,
    as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ReferenceConfig,
    type: :list
  )

  field(:resources, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ResourceConfig, type: :list)
  field(:revisionId)
  field(:sequenceNumber)

  field(:targets, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1TargetServerConfig, type: :list)

  field(:traceConfig, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1RuntimeTraceConfig)
  field(:uid)
end

defimpl Poison.Decoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1EnvironmentConfig do
  def decode(value, options) do
    GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1EnvironmentConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1EnvironmentConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
